#include "Buffer.hpp"

int main()
{

    Buffer buf;
    for(int i=0;i<300;i++)
    {
       std::string  ret = "hello linux "+std::to_string(i)+'\n';
       buf.WriteStringAndPush(ret);
    }
    while(buf.ReadAbleSize()>0)
    {
        std::cout << buf.GetLineAndPop();
    }

    std::cout << buf.ReadAbleSize() << std::endl;
    std::string str1;
    str1 = buf.ReadStringAndPop(buf.ReadAbleSize());
    std::cout << str1 << std::endl;

    Buffer buf0;
    std::string str2="hello linux !!";
    buf0.WriteStringAndPush(str2);
    std::cout << buf0.ReadAbleSize() << std::endl;

    Buffer buf1;
    buf1.WriteBufferAndPush(buf0);
    std::cout << buf1.ReadAbleSize() << std::endl;

    return 0;
}
